﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace CSP.Package
{
    public class ModificationEntryHelper
    {
        public static SPWebConfigModification CreateModification(string Name, string XPath, string Value, SPWebConfigModification.SPWebConfigModificationType Type)
        {
            SPWebConfigModification modification = new SPWebConfigModification(Name, XPath);
            modification.Owner = "CSP Config Management";
            modification.Sequence = 0;
            modification.Type = Type;
            modification.Value = Value;
            return modification;
        }
    }

    public struct ModificationEntry
    {
        public string Name;
        public string XPath;
        public string Value;
        public ModificationEntry(string Name, string XPath, string Value)
        {
            this.Name = Name;
            this.XPath = XPath;
            this.Value = Value;
        }
    }
}
